import React,{useContext,useState} from 'react'
interface STATETYPES{
    name:string;
    age:number;
}
export default function My() {
    
    // const [num,setNum]=useState<number>(0)
    // const [str,setStr]=useState<string>("1")
    // const [bol,setBol]=useState<boolean>(true)
    // const [obj,setObj]=useState<STATETYPES>()
    // const [arr,setarr]=useState<Array<string>>(["1","2"])
    // const [test,setTest]=useState<Array<STATETYPES>>([{
    //     name:"123",
    //     age:18
    // }])
    const [num,setNum]=useState<number>(0)
    const handleClick=()=>{
        console.log(123);
        setNum(num+1)
    }
    return (
        <div>
            <button onClick={()=>handleClick()}>setValue</button>
            <p>值:{num}</p>
        </div>
    )
}
